<h2>Login</h2>
<%= form_for @changeset,@action,fn f -> %>
	<%= if @changeset.action do %>
	    <div class="alert alert-danger">
	      <p>Oops, something went wrong! Please check the errors below:</p>
	      <ul>
	        <%= for {attr, message} <- f.errors do %>
	          <li><%= humanize(attr) %> <%= message %></li>
	        <% end %>
	      </ul>
	    </div>
  	<% end %>

  	<div class="form-group">
  		<label>用户名</label>
  		<%= text_input f, :name, class: "form-control" %>
  	</div>

  	<div class="form-group">
  		<label>密码</label>
  		<%= password_input f, :password, class: "form-control" %>
  	</div>

  	<div class="form-group">
  		<%= submit "Submit", class: "btn btn-primary" %>
  	</div>
<% end %>